import request from '../../util/axios'

// 查询库房信息
export const getHouseList = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/storehouse-info/storehouseinfo/paging',
    method: 'post',
    data: data
  })
}
// 查询库房信息 --- 新增
export const addHouseList = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/storehouse-info/add',
    method: 'post',
    data: data
  })
}
// 查询库房信息 --- 修改
export const editHouseList = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/storehouse-info/edit',
    method: 'put',
    data: data
  })
}
// 查询库房信息 --- 删除
export const detHouseList = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/storehouse-info/deleteById',
    method: 'delete',
    data: data
  })
}

// 查询密集架信息
export const getDenseFrameList = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/storehouse-shelving/storehouseShelving/paging',
    method: 'post',
    data: data
  })
}
// 查询密集架信息 --- 新增
export const addDenseFrameList = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/storehouse-shelving/add',
    method: 'post',
    data: data
  })
}
// 查询密集架信息 --- 修改
export const editDenseFrameList = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/storehouse-shelving/edit',
    method: 'put',
    data: data
  })
}
// 查询密集架信息 --- 删除
export const detDenseFrameList = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/storehouse-shelving/deleteById',
    method: 'delete',
    data: data
  })
}

// 查询库房档案信息
export const getDenseFrameInfo = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/shelving-archives/shelving-archives/paging',
    method: 'post',
    data: data
  })
}

// 查询库房档案信息  - 密集架上档案信息 -- 左
export const getDenseFrameArchivesInfoLeft = (id) => {
  return request({
    url: `/yuyi-storehouse-boot/modules/storehouse-shelving/storehouseShelving/queryleft?id=${id}`,
    method: 'post'
  })
}
// 查询库房档案信息  - 密集架上档案信息 -- 右
export const getDenseFrameArchivesInfoRight = (id) => {
  return request({
    url: `/yuyi-storehouse-boot/modules/storehouse-shelving/storehouseShelving/queryright?id=${id}`,
    method: 'post'
  })
}
// 查询库房档案信息  - 密集架上档案信息 - 查询库房档案信息
export const getDenseFrameArchivesInfo = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/shelving-archives/shelving-archives/paging',
    method: 'post',
    data: data
  })
}

// 档案入库  --  库房树
export const getHouseTree = (idCategory, data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/storehouse-shelving/storehouseShelving/tree',
    method: 'post',
    data: data
  })
}
// 档案入库  --
export const getArchivesInCategory = (idCategory, data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/shelving-archives/queryCategory',
    method: 'post',
    data: data
  })
}
// 档案入库 --- 分页查询数据 --
export const getArchivesInList = (idCategory, data) => {
  return request({
    url: `/yuyi-storehouse-boot/modules/shelving-archives/${idCategory}/list`,
    method: 'post',
    data: data
  })
}
// 档案入库
export const addArchivesIn = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/shelving-archives/shelving-archives/isrk',
    method: 'post',
    data: data
  })
}
// 档案出库
export const addArchivesOut = (data) => {
  return request({
    url: '/yuyi-storehouse-boot/modules/shelving-archives/shelving-archives/isck',
    method: 'post',
    data: data
  })
}
